﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Pottery.Module.Store.Models;
using Pottery.Model.Infrastructure;
using System.IO;
using Pottery.Module.Infrastructure.Models;

namespace Pottery.Console
{
    class Program
    {
        static void Main(string[] args)
        {
            #region User
            //List<User> valid = new List<User>();
            //List<User> invalid = new List<User>();
            //User user1 = new User("brain", "4987fhi4", "Kirill", "Garykin", "kirill.garykin@gmail.com", true);
            //valid.Add(user1);
            //User user2 = new User("pup45", "111", "Vasya", "Pupkin", "vasya.pupkin@gmail.com", string.Empty, "496494443", null, false);
            //invalid.Add(user2);
            #endregion

            #region User History
            //List<UserHistory> validHistory = new List<UserHistory>();
            //List<UserHistory> invalidHistory = new List<UserHistory>();
            //UserHistory History1 = new UserHistory("brain","Registration","Added new user in the system");
            //validHistory.Add(History1);
            //UserHistory History2 = new UserHistory("    ", "Some action", "Some description");
            //invalidHistory.Add(History2);
            #endregion

            #region Partner Card
            //List<PartnerCard> valid = new List<PartnerCard>();
            //List<PartnerCard> invalid = new List<PartnerCard>();
            //PartnerCard model1 = new PartnerCard("brain0933979342brain1111", user1);
            //valid.Add(model1);
            //PartnerCard model2 = new PartnerCard("12323455", null);
            //invalid.Add(model2);
            #endregion

            #region Employee
            //List<Employee> valid = new List<Employee>();
            //List<Employee> invalid = new List<Employee>();
            //Employee user1 = new Employee("Kirill", "Garykin", "brain", "4987fhi4", "kirill.garykin@gmail.com", Enumerators.EmployeeStatus.Owner, 100500);
            //valid.Add(user1);
            //Employee user2 = new Employee("Vasya", "Pupkin", "pup45", "111", "vasya.pupkin@gmail.com", string.Empty, "496494443", null, Enumerators.EmployeeStatus.Worker, 100);
            //invalid.Add(user2);
            #endregion

            #region Storage
            //List<Storage> valid = new List<Storage>();
            //List<Storage> invalid = new List<Storage>();
            //Storage model1 = new Storage("1234567890", 123, "Somewhere", "Candy", 1, "092802828");
            //valid.Add(model1);
            //Storage model2 = new Storage("       ", 321, "Kuba", "Sugar", 2, "0465438219");
            //invalid.Add(model2);
            #endregion

            #region Product
            List<Product> valid = new List<Product>();
            List<Product> invalid = new List<Product>();
            Product model1 = new Product("ABCDE12345", "Super Cup", Enumerators.Type.Cup, Enumerators.Material.WhiteArgil, new Size(100, 100, 100), 100, string.Empty, default(DateTime), "Do something", 80, true);
            valid.Add(model1);
            Product model2 = new Product("     ", "Somthing", Enumerators.Type.Plate, Enumerators.Material.WhiteArgil, new Size(35, 23, 67), 234, string.Empty, default(DateTime), "Do something", 123, false);
            invalid.Add(model2);
            #endregion

            #region User serialization

            //DataSerializerHelper.XmlWrite<List<User>>(valid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\User", "UserValid.xml"));
            //DataSerializerHelper.XmlWrite<List<User>>(invalid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\User", "UserInValid.xml"));

            #endregion

            #region UserHistory serialization

            //DataSerializerHelper.XmlWrite<List<UserHistory>>(validHistory, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\UserHistory", "UserHistoryValid.xml"));
            //DataSerializerHelper.XmlWrite<List<UserHistory>>(invalidHistory, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\UserHistory", "UserHistoryInValid.xml"));

            #endregion

            #region PartnerCard serialization

            //DataSerializerHelper.XmlWrite<List<PartnerCard>>(valid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\PartnerCard", "PartnerCardValid.xml"));
            //DataSerializerHelper.XmlWrite<List<PartnerCard>>(invalid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\PartnerCard", "PartnerCardInValid.xml"));

            #endregion

            #region Employee serialization

            //DataSerializerHelper.XmlWrite<List<Employee>>(valid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\Employee", "EmployeeValid.xml"));
            //DataSerializerHelper.XmlWrite<List<Employee>>(invalid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\Employee", "EmployeeInValid.xml"));

            #endregion

            #region Employee serialization

            //DataSerializerHelper.XmlWrite<List<Storage>>(valid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\Storage", "StorageValid.xml"));
            //DataSerializerHelper.XmlWrite<List<Storage>>(invalid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\Storage", "StorageInValid.xml"));

            #endregion

            #region Product serialization

            DataSerializerHelper.XmlWrite<List<Product>>(valid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\Product", "ProductValid.xml"));
            DataSerializerHelper.XmlWrite<List<Product>>(invalid, Path.Combine(@"E:\PotteryTeam1\Project\Pottery\Pottery.UnitTests\Data\Product", "ProductInValid.xml"));

            #endregion
        }
    }
}
